package com.example.test.services;

import com.example.test.dao.DirectorRepository;
import com.example.test.entities.Director;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DirectorService {
    @Autowired
    DirectorRepository directorRepository;

    public Director save(Director director){
        return directorRepository.save(director);
    }

    public List<Director> getAll(){
        return directorRepository.findAll();
    }
}
